import 'package:flutter/material.dart';

// Function是内部关键字
class FunctionType extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar:AppBar(
        title: Text("功能型组件"),
      ) ,
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            RaisedButton(
              child: Text("导航返回拦截"),
              onPressed: (){
                Navigator.of(context).pushNamed('/function/back');
              },
            ),
            RaisedButton(
              child: Text("颜色和主题"),
              onPressed: (){
                Navigator.of(context).pushNamed('/function/theme');
              },
            ),
            RaisedButton(
              child: Text("异步UI更新"),
              onPressed: (){
                Navigator.of(context).pushNamed('/function/future');
              },
            ),
            RaisedButton(
              child: Text("对话框详解"),
              onPressed: (){
                Navigator.of(context).pushNamed('/function/dialog');
              },
            ),
            RaisedButton(
              child: Text("指针事件"),
              onPressed: (){
                Navigator.of(context).pushNamed('/function/event');
              },
            ),
            RaisedButton(
              child: Text("通知"),
              onPressed: (){
                Navigator.of(context).pushNamed('/function/notification');
              },
            ),
            RaisedButton(
              child: Text("手势识别"),
              onPressed: (){
                Navigator.of(context).pushNamed('/function/gesture');
              },
            ),
          ],
        ),
      ),

    );
  }
}